import {
  Text,
  View,
  ScrollView,
  Image,
  Dimensions,
  StyleSheet,
} from 'react-native';
import React, {Component} from 'react';
import Swiper from 'react-native-swiper';

export default class swiperCom extends Component {
  render() {
    return (
      <ScrollView>
        {/* swiper必须放在scrollview中 */}
        <Swiper style={styles.wrapper} showsButtons={true} autoplay={true}>
          <Image
            style={[styles.slideImage]}
            source={require('./Image/Snipaste_2023-12-05_23-25-38.png')}
          />
          <Image
            style={[styles.slideImage]}
            source={require('./Image/gwen.png')}
          />
          <Image
            style={[styles.slideImage]}
            source={require('./Image/Snipaste_2023-12-05_23-25-38.png')}
          />
        </Swiper>
      </ScrollView>
    );
  }
}
const styles = StyleSheet.create({
  wrapper: {
    height: 200,
  },
  slideImage: {
    height: 200,
    width: Dimensions.get('window').width,
  },
});
